{% extends "auth/base.html" %}

{% load url from future %}
{% block title %}Cambiar Contrase&ntilde;a{%endblock%}
{% block content %}
    {% if form.errors %}
        <div id="form-error">
            <ul>
            {% for field in form %}
                {% for error in field.errors %}
                <li>{{ error|escape }}</li>
                {% endfor %}
            {% endfor %}
            </ul>
        </div>
    {% endif %}

    <form method="post" action="{% url 'django.contrib.auth.views.password_change' %}">
        {% csrf_token %}
        <table>
            {% for field in form %}
                <tr>
                    <td>{{ field.label_tag }}</td>
                    <td>{{ field }}</td>
                </tr>
            {% endfor %}
        </table>
        <input type="submit" value="Cambiar Contraseña" />

        {% if next %}
            <input type="hidden" name="next" value="{{ next }}" />
        {% else %}
            <input type="hidden" name="next" value="/" />
        {% endif %}
    </form>

{% endblock %}
